package se.liu.oschi129.animation.animationspace;

import se.liu.oschi129.animation.Animation;
import se.liu.oschi129.animation.AnimationIOException;

/**
 * All images used in the game should be subclasses to this abstract class.
 * 
 * @author oschi129
 */
public class AnimatedImage {

	private Animation content = new Animation();
	
	/** Adds a resource to the animated image */
	public void addResource(String name) {
		try {
			content.addImageFromResource(name);
		} catch (AnimationIOException exception) {
			exception.printStackTrace();
		}
	}
	
	/** Returns the animation */
	public Animation getAnimation() {
		return content;
	}
	
}
